package exe3.carrent;

public abstract   class Car {
    private String carNum;//车牌号
    private String brand;//品牌
    private double rent;//日租金
    private String model;
    private int seatNum;
    private boolean isLease;//是否出借


    public Car(){}

    public Car(String carNum,String brand,double rent,boolean isLease,String model,int seatNum){
        this.carNum=carNum;
        this.brand=brand;
        this.rent=rent;
        this.isLease=isLease;
        this.model=model;
        this.seatNum=seatNum;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public int getSeatNum() {
        return seatNum;
    }

    public void setSeatNum(int seatNum) {
        this.seatNum = seatNum;
    }

    public boolean isLease() {
        return isLease;
    }

    public void setLease(boolean lease) {
        isLease = lease;
    }

    public String getCarNum() {
        return carNum;
    }

    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getRent() {
        return rent;
    }

    public void setRent(double rent) {
        this.rent = rent;
    }

    public abstract double countRent(int days);

    public String toString(){
        return carNum+"\t"+brand+"\t座位数"+seatNum+"\t\t"+model+"\t\t"+rent+"\t"+(isLease?"未出借":"已出借");
    }

    public void rentcar (String carNum){}


}
